package com.jbit.examSystem.vo;

import java.io.Serializable;

public class RankingVo implements Serializable {
    private Integer rankingId;
    private String stuName;
    private Integer okAmount;
    private Integer amount;
    private Integer correctAmount;
    private String accuracy;

    public static String getAccuracy(int correctAmount,int amount) {
        double accuracy = (double)correctAmount/amount * 100;

        return accuracy + "%";
    }

    public String getAccuracy() {
        return accuracy;
    }

    public void setAccuracy(String accuracy) {
        this.accuracy = accuracy;
    }

    public Integer getRankingId() {
        return rankingId;
    }

    public void setRankingId(Integer rankingId) {
        this.rankingId = rankingId;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public Integer getOkAmount() {
        return okAmount;
    }

    public void setOkAmount(Integer okAmount) {
        this.okAmount = okAmount;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getCorrectAmount() {
        return correctAmount;
    }

    public void setCorrectAmount(Integer correctAmount) {
        this.correctAmount = correctAmount;
    }
}
